package org.sja.log2traffic.server;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Log2TrafficServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String configurationName = getServletConfig().getInitParameter("DEFAULT_CONFIG");
		String configurationFromURL = req.getParameter("config");
		if (configurationFromURL != null){
			configurationName = configurationFromURL;
		}
		req.setAttribute("configuration", configurationName);
		RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/log2traffic.jsp");		
		dispatcher.forward(req, resp);
	}
	
	

}
